import { createRouter, createWebHistory } from 'vue-router'

// 导入四个地图组件
import OpenLayersDixing from '../components/dixing.vue'
import OpenLayersShiliang from '../components/shiliang.vue'
import OpenLayersYingxiang from '../components/yingxiang.vue'
import OpenLayersGeoserver from '../components/geoserver.vue'
import Cesium from '../components/Cesium.vue'
import DrawGraph from "../components/drawGraph.vue";
import Relitu from "../components/relitu.vue";

const routes = [
    { path: '/', redirect: '/drawGraph' },
    { path: '/dixing', component: OpenLayersDixing, name: '地形图' },
    { path: '/shiliang', component: OpenLayersShiliang, name: '矢量图' },
    { path: '/yingxiang', component: OpenLayersYingxiang, name: '影像图' },
    { path: '/geoserver', component: OpenLayersGeoserver, name: 'GeoServer' },
    { path: '/cesium', component: Cesium, name: 'Cesium' },
    { path: '/drawGraph', component: DrawGraph, name: '绘制图形' },
    { path: '/relitu', component: Relitu, name: '热力图' },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router